package com.mysoft.gfyx.clue.remoteservice;

import com.mysoft.framework.rpc.annotation.RemoteAction;
import com.mysoft.framework.rpc.annotation.RemoteService;
import com.mysoft.framework.sdk.system.dto.UserDTO;
import com.mysoft.gfyx.clue.remoteservice.dto.GetUsersRequestDto;
import com.mysoft.gfyx.clue.remoteservice.dto.SystemGetUserRequestDto;
import feign.Headers;
import feign.Param;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@RemoteService(appCode = "0000", path = "/Mysoft.PubPlatform.Organization.PublicServices.IOrganizationPublicService")
public interface RemoteSystemService {

    @RemoteAction(path = "/GetUser", method = RequestMethod.GET)
    @Headers("Content-Type: application/json")
    UserDTO GetUser(@RequestParam String userGuid);

    @RemoteAction(path = "/GetUsers", method = RequestMethod.POST)
    @Headers("Content-Type: application/json")
    List<UserDTO> GetUsers(@RequestBody GetUsersRequestDto getUsersRequestDto);

    @RemoteAction(path = "/GetAllUsers", method = RequestMethod.POST)
    @Headers("Content-Type: application/json")
    List<UserDTO> GetAllUsers(@RequestBody(required = false) SystemGetUserRequestDto systemGetUserRequestDto);
}
